package com.saicmotor.pay.http;

import com.google.gson.annotations.SerializedName;

public class BaseResponse<T> {
    private static final String RESULT_CODE_OK = "200";

    @SerializedName("resultMsg")
    private String message;
    @SerializedName("code")
    private String code;
    @SerializedName("data")
    private T data;

    public boolean isSuccessful() {
        return RESULT_CODE_OK.equals(code);
    }


    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getResultCode() {
        return code;
    }

    public void setResultCode(String resultCode) {
        this.code = resultCode;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
